<html>
<head>
	<title>NTSH-JASS's home</title>
	<meta name=keywords content="3D scenegraph scene-capturing stack"/>

	<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
	</script>

	<script type="text/javascript">
		_uacct = "UA-165968-1";
		urchinTracker();
	</script>

	<style type="text/css">
		h1	{font-family: sans-serif; font-size: 140%}
		h2	{font-family: sans-serif; font-size: 120%}
		h3      {font-family: sans-serif; font-size: 100%}
		p	{font-family: sans-serif; font-size: 90%}
		table	{font-family: sans-serif; font-size: 90%}
		ul	{font-family: sans-serif; font-size: 90%}
	</style>
</head>

<body bgcolor="#000000"
      text="#B0C0D0"
      link="#C8D8E8"
      alink="#E0E0E0"
      vlink="#808080">

<h2 align=center>NTSH-JASS</h2>
<p>Nothing to See Here - Just Another Scenegraph Stack (NTSH-JASS, pronounced 'en-tish-jass') is a simple scene-graph implementation for OpenGL. It provides control over the stacking and accomplishing of draw calls. An essential concept behind NTSH-JASS is the orthogonality of scene- and spatial hierarchies - the scene graph does <u>not</u> comprise a spatial graph. Instead, it controls <u>what</u> gets drawn <u>when</u>. The spatial information for each individual draw call is just another parameter, along with material, light setup, etc.</p>
<p>At its top level NTSH-JASS implements a stack of scene graphs, each one constituting a tree structure. The leaves are draw calls, and the nodes are grouping entities which control the drawing order of their content - draw calls or other groups. As traversing is depth-first, groups can be viewed as composite draw calls, or draw batches, whose internal draw order is arbitrated by their local sorting polices. Note that such a policy is exerted at the time of insertion of new elements, thus keeping the sorting time-complexity low. Also note that the local sorting policy of a group is <u>not</u> extended over the content of any nested groups, as those have their own policies.</p>
<p>Groups can be either of two types depending on their sorting policy: automatic or manual. Automatic sorting order is depth-based, and provides that opaque draws come first in front-to-back order, followed by translucent draws carried in back-to-front oder. Manual sorting order honors the order in which draw calls arrive from the user.</p>
<p>NTSH-JASS also implements a rudimentary material system, currently in two versions: GLSL-based and ARB_program-based, the latter featuring suport for GL_ATI_text_fragment_shader extension which can be found only in OSX-based ATI ICDs, and only on hardware starting with the Radeon 8500 series - R200 and derivatives.</p>
<p>The code is well-portable - essentially GLUT with GLEW where applicable. NTSH-JASS has been known to run under OSX, Linux and Cygwin (support for the latter has been discontinued), so getting the latest NTSH-JASS up and running under those environments can be anything from effortless to five minutes of script fixing.</p>
<p>Project source files description:</p>

<table border=0 cellpadding=0 cellspacing=0 bgcolor="#606060">
<tr>
<td>
	<table border=0 cellspacing=1 cellpadding=5>
	<tr>
	<td bgcolor="#000000">rendPlatform.hpp</td>
	<td bgcolor="#000000">various platform helpers</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendVect.hpp</td>
	<td bgcolor="#000000">vector math</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendBox.hpp</td>
	<td bgcolor="#000000">simple interval math</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendClipper.hpp</td>
	<td bgcolor="#000000">convex volume clipper</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendPixel.hpp</td>
	<td bgcolor="#000000">byte-multiple pixel accessor</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendVectorArray.hpp</td>
	<td bgcolor="#000000">lightweight vector array container</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendRegister.cpp<br>rendRegister.hpp</td>
	<td bgcolor="#000000">stack-like searchable container</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendColor.cpp<br>rendColor.hpp</td>
	<td bgcolor="#000000">RGBA color abstraction</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendCamera.cpp<br>rendCamera.hpp</td>
	<td bgcolor="#000000">camera controller</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendLight.cpp<br>rendLight.hpp</td>
	<td bgcolor="#000000">light controller</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendVisual.hpp</td>
	<td bgcolor="#000000">draw primitive interface</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendAttrBufferBasis.hpp<br>rendAttrBuffer.cpp<br>rendAttrBuffer.hpp<br>rendAttrBufferMapped.cpp<br>rendAttrBufferMapped.hpp</td>
	<td bgcolor="#000000">vertex attribute buffers</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendMesh.cpp<br>rendMesh.hpp</td>
	<td bgcolor="#000000">indexed mesh draw primitive</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendMeshUtils.hpp</td>
	<td bgcolor="#000000">mesh-related utilities</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendMaterial.cpp<br>rendMaterial.hpp</td>
	<td bgcolor="#000000">drawing material</td>
	</tr>
	<tr>
	<td bgcolor="#000000">rendSystem.cpp<br>rendSystem.hpp</td>
	<td bgcolor="#000000">rendition stack</td>
	</tr>
	<tr>
	<td bgcolor="#000000">main.cpp</td>
	<td bgcolor="#000000">primer using the stack</td>
	</tr>
	<tr>
	<td bgcolor="#000000">phong_blinn.arbvp<br>
phong_blinn_vert.arbvp<br>
sum_primary_secondary.atifp<br>
normal_direction.atifp<br>
normal_direction_renorm.atifp<br>
normal_length.atifp<br>
normal_length_renorm.atifp<br>
phong_blinn.atifp<br>
phong_blinn_renorm.atifp</td>
	<td bgcolor="#000000">a bunch of shaders useful for mesh inspection</td>
	</tr>
	</table>
</td>
</tr>
</table>

<p>NTSH-JASS project repository can be found online <a href="https://code.google.com/p/ntsh-jass/">here</a>. It contains three project variations: ARB_program desktop-based, GLSL desktop-based, and GLSL embedded-based. To build any of those you will need <a href="https://code.google.com/p/lib3ds/downloads/list">lib3ds</a> 2.0.0-rc1. For the desktop variations alone you will also need GLUT and GLEW, while the embedded version needs EGL.</p>

<p>Version history (covers only the self-hosted period, prior to moving to dedicated online hosting):</p>

<p>2010.05.24 (on the road to ES 2.0)</p>
<ul>
<li>Major refactoring of the GLSL fork - it is getting further from its ARB_program roots and closer to its eventual goal of GL ES 2.0/GL 3.x core profile compliance. For the purpose:</li>
<li>Introduced shader program parameter registers and a generic parameter validation protocol. Parameter feeding is now a matter of user-shader agreement, the framework is fully orthogonal to that.</li>
<li>Introduced identity mapping of shader program attributes to AttribBuffer semantics. That makes the framework largely orthogonal to the semantics agreement between user and shader, except for mesh deserialisation, where the framework uses a default attribute semantics convention. The latter is unavoidable if the framework is expected to handle any 'canned semantics' mesh formats.</li>
<li>Introduced yet another mesh file format reader, this time from a proprietary format that is more conteporary and meets better the needs of production meshes. That functonality is present only in the GLSL fork, for now.</li>
<li>Added a couple more sample GLSL shaders - this time for skinning, and skinning with morphing. Added an example of skinnable mesh with a corresponding skeleton snapshot, i.e. a single frame from a skeletal animation.</li>
<li>Removed the 'zeroth transform' functionality from Visual - that did not prove to be of much practical value.</li>
</ul>

<p>2010.04.11</p>
<ul>
<li>Removed the last remaining instance of asset pointer referencing through eliminating the custom containers for AttrBuffers - now those are kept in the register which originally used to keep only the GL names of AttrBuffers. With that every kind of asset - mesh attribute buffer, shader program, or texture, is referenced throughout the framework by name (i.e. handle) alone - no pointers of any kind remain referencing assets. GLSL fork updated accordingly.</li>
<li> Refactored the Register hack of a container a bit.</li>
</ul>

<p>2010.02.28</p>
<ul>
<li>Updated the GL program object acquisition scheme in Material::Pass for the GLSL fork; now it behaves identically to the ARB program version. Added a LinkedProgramRegister.</li>
</ul>

<p>2010.02.22</p>
<ul>
<li>Cleaned up the GL program object acquisition scheme in Material::Pass. No more holding of GL names by entities whose job is different. GLSL version is yet to receive this treatment.</li>
</ul>

<p>2009.09.09</p>
<ul>
<li>First release of the GLSL fork of NTSH-JASS - project shares almost its entire codebase with the original version, except for the drawing materials, which are entirely GLSL-based in this one.</li>
</ul>

<p>2009.08.25</p>
<ul>
<li>Re-implemented the attribute buffer abstraction: renamed former AttrBuffer to AttrBufferMapped; refactored the code and fixed a few (not so minor) bugs there; introduced another AttrBuffer - a buffer abstraction which does not use user-space VBO mapping. As the two buffer abstractions have somewhat different interfaces (one is lock-less, the other is not), refactored MeshIndexed to work with the new AttrBuffer; AttrBufferMapped remains unused for now.</li>
<li>Dropped own 3ds reader from MeshIndexed in favor of the lib3ds one; cleaned up the code considerably. As it is topology-optimising, 3ds reader is still dog-slow but now it has an option to ignore smoothing groups, which speeds it up a bit.</li>
<li>Refactored VectorArray - now it's a proper container. Its original principle of minimization of data copying remains intact.</li>
</ul>

<p>2009.07.15</p>
<ul>
<li>Refactored a bit the vector class hierarchy, improving type casting among compatible classes.</li>
<li>Added the obligatory teapot mesh to the sample assets - a cornerstone moment in every graphics poject.</li>
</ul>

<p>2009.03.09</p>
<ul>
<li>Added an abstraction of VBOs; rewrote MeshIndexed to use this instead of its original ad-hoc VBO handling.</li>
<li>Added a keystoke to the primer for saving of the current mesh collection to native mesh format at runtime.</li>
<li>Added to assets native-format versions of some of the original 3ds sample meshes (not the cube though - cube.mesh and cube.3ds are different meshes).</li>
</ul>

<p>2008.12.30</p>
<ul>
<li>At last, a unified makefile for linux and cygwin. Building for those platforms may not be necessarily simpler now, but at least it is tidier. Also, if using the Makefile to build under OSX I do advise you to first peek at the Makefile, as the OSX section relies on a few env variables.</li>
</ul>

<p>2008.11.15</p>
<ul>
<li>Added another .3ds mesh reader utilizing <a href="http://www.lib3ds.org/">lib3ds</a> (builds against lib3ds 2008.09.09, 2.0.0-rc1). Reader also optimizes mesh topology at load time, which can be really slow on large meshes; use selectively.</li>
<li>Added a few sample 3ds meshes (found in public domain) for testing.</li>
<li>Cygwin build script has officially reached the status of 'utter hack' (it was hackinsh to boot). I may get it into proper shape later, or scrap it altogether. Time will tell.</li>
</ul>

<p>2008.10.08</p>
<ul>
<li>Added ARB_fragment_program versions for all fragment shaders.</li>
<li>Minor optimisations in some ATI_text_fragment_shader shaders.</li>
</ul>

<p>2008.09.21 (first release)</p>
<ul>
<li>Lots of TODOs and placeholders throughout: no secondary render targets, no (de)serialization of materials, etc.</li>
<li>Support for OSX (Xcode), Win32 (Cygwin) and Linux platforms; PPC and IA32 architectures supported. Building requires GCC 3.3 as a minimum.</li>
<li>Support for either ATI text_fragment_shader (OSX-only) or ARB fragment_program fragment shaders, selectable at compile time.</li>
<li>Sample application capable of loading .3ds and native mesh formats; rudimentary mesh viewing using two cameras, demonstrating the view-frustum clipping mechanics in real-time.</li>
<li>Utility shaders for inspecting normal length & orientation.</li>
</ul>

<table width="100%" border=0 cellpadding=4 cellspacing=0 bgcolor="#606060">
<tr><td bgcolor="#404040">&copy; 2008-2010 blu (blu DOT dark AT gmail DOT com)</td></tr>
</table>

</body>
</html>
